import java.util.Scanner;

/**
 * Created with Intellij IDEA.
 * Description:
 * User:Lenovo
 * Date:2024-12-07
 * Time:12:01
 */
public class Text {
    public static void Hanot(int n,char A,char B,char C){
        if(n==1){
            System.out.println(A+"-"+C);
        }else{
            Hanot(n-1,A,C,B);
            System.out.println(A+"-"+C);
            Hanot(n-1,B,A,C);
        }
    }
    public static void main(String[] args) {
        Scanner san = new Scanner(System.in);
        Hanot(san.nextInt(),'A','B','C');
    }
}
